
<form method="get" action="index.php">
<select id="select_sidebar" name="video_id" onchange="this.form.submit()">
<option value="">select video to open</option>
<?php
require_once "include/config.php";
require_once "include/functions.php";

$userid = get_user_info();
$user_id = $userid['id'];
$videos = get_user_videos($user_id);
for ($i = 0; $i <= count($videos)-1; $i++) {
    echo "<option value='".$videos[$i]['id']."'>".$videos[$i]['name']."</option>";
}
?>
</select>
<input type="hidden" name="page" value="video_player" />
</form>